package com.atomos.strategy.action.velocity
{
	import flash.geom.Point;
	
	import com.atomos.particle.Particle;
	import com.atomos.strategy.action.AbstractAction;
	import com.atomos.strategy.action.ActionStrategy;	

	public class ForceAction extends AbstractAction implements ActionStrategy
	{
		protected var _pForce : Point;
		
		public function ForceAction ( force : Point )
		{
			setForce( force );
		}
		public override function process(particle:Particle):void
		{
			particle.velocity.x += _pForce.x * _nTimeStep;
			particle.velocity.y += _pForce.y * _nTimeStep;
		}
		public function setForce ( force : Point ) : void
		{
			_pForce = force ? force : new Point();
		}
		public function getForce () : Point
		{
			return _pForce;
		}
	}
}